import { BasicColumn, FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
  {
    title: '显示名称',
    dataIndex: 'displayName',
  },
  {
    title: '唯一编码',
    dataIndex: 'name',
  },
  {
    title: '流程分类',
    dataIndex: 'type',
    customRender: ({ text }) => {
      return render.renderDict(text, 'wf_process_type');
    },
  },
  {
    title: '版本号',
    dataIndex: 'version',
  },
  {
    title: '状态',
    dataIndex: 'state',
    customRender: ({ text }) => {
      return render.renderDict(text, 'wf_process_define_state');
    },
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'm_LIKE_displayName',
    label: '显示名称',
    component: 'Input',
    colProps: {
      xl: 6,
      xxl: 6,
    },
    componentProps: {
      placeholder: '请输入显示名称',
    },
  },
  {
    field: 'm_LIKE_name',
    label: '唯一编码',
    component: 'Input',
    colProps: {
      xl: 6,
      xxl: 6,
    },
    componentProps: {
      placeholder: '请输入唯一编码',
    },
  },
];
